package com.cqjtu.eecs.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.Objects;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

/**
 * <p>
 * 自然班
 * </p>
 *
 * @author    
 * @since 2022-03-07
 */

@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@ApiModel(value="NaturalClass对象", description="自然班")
public class NaturalClass implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "专业代码")
    private String majorCode;

    @ApiModelProperty(value = "自然班编号")
    @TableId(value = "nc_id", type = IdType.AUTO)
    private Integer ncId;

    @ApiModelProperty(value = "年级")
    private Integer grade;

    @ApiModelProperty(value = "自然班名")
    private String naturalClassName;

    @ApiModelProperty(value = "学业导师")
    private Integer tid;

    public NaturalClass(String majorCode, Integer ncId, Integer grade, String naturalClassName) {
        this.majorCode = majorCode;
        this.ncId = ncId;
        this.grade = grade;
        this.naturalClassName = naturalClassName;
        this.tid = null;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        NaturalClass that = (NaturalClass) o;
        return Objects.equals(majorCode, that.majorCode) &&
                Objects.equals(grade, that.grade) &&
                Objects.equals(naturalClassName, that.naturalClassName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(majorCode, grade, naturalClassName);
    }
}
